<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"> <style>
	.KEYW {color: #933;}
	.COMM {color: #bbb; font-style: italic;}
	.NUMB {color: #393;}
	.STRN {color: #393;}
	.REGX {color: #339;}
	.line {border-right: 1px dotted #666; color: #666; font-style: normal;}
	</style></head><body><pre><span class='line'>  1</span> <span class="COMM">/*
<span class='line'>  2</span>  * $Id: om-messagebox.js,v 1.25 2012/06/28 02:13:57 licongping Exp $
<span class='line'>  3</span>  * operamasks-ui omMessageBox @VERSION
<span class='line'>  4</span>  *
<span class='line'>  5</span>  * Copyright 2011, AUTHORS.txt (http://ui.operamasks.org/about)
<span class='line'>  6</span>  * Dual licensed under the MIT or LGPL Version 2 licenses.
<span class='line'>  7</span>  * http://ui.operamasks.org/license
<span class='line'>  8</span>  *
<span class='line'>  9</span>  * http://ui.operamasks.org/docs/
<span class='line'> 10</span>  *
<span class='line'> 11</span>  * Depends:
<span class='line'> 12</span>  *  om-core.js
<span class='line'> 13</span>  *  om-mouse.js
<span class='line'> 14</span>  *  om-draggable.js
<span class='line'> 15</span>  *  om-position.js
<span class='line'> 16</span>  */</span><span class="WHIT">
<span class='line'> 17</span> </span><span class="WHIT"> 
<span class='line'> 18</span> </span><span class="PUNC">(</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">$</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 19</span> </span><span class="WHIT">	 </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">tmpl</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">'&lt;div class="om-messageBox om-widget om-widget-content om-corner-all" tabindex="-1">'</span><span class="PUNC">+</span><span class="WHIT">
<span class='line'> 20</span> </span><span class="WHIT">	                </span><span class="STRN">'&lt;div class="om-messageBox-titlebar om-widget-header om-corner-top om-helper-clearfix">'</span><span class="PUNC">+</span><span class="WHIT">
<span class='line'> 21</span> </span><span class="WHIT">	                    </span><span class="STRN">'&lt;span class="om-messageBox-title">&lt;/span>'</span><span class="PUNC">+</span><span class="WHIT">
<span class='line'> 22</span> </span><span class="WHIT">	                    </span><span class="STRN">'&lt;a href="#" class="om-messageBox-titlebar-close om-corner-tr">&lt;span class="om-icon om-icon-closethick">&lt;/span>&lt;/a>'</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT">
<span class='line'> 23</span> </span><span class="WHIT">	                </span><span class="STRN">'&lt;/div>'</span><span class="PUNC">+</span><span class="WHIT">
<span class='line'> 24</span> </span><span class="WHIT">	                </span><span class="STRN">'&lt;div class="om-messageBox-content om-widget-content">'</span><span class="PUNC">+</span><span class="WHIT">
<span class='line'> 25</span> </span><span class="WHIT">	                    </span><span class="STRN">'&lt;table>&lt;tr vailgn="top">'</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT">
<span class='line'> 26</span> </span><span class="WHIT">	                        </span><span class="STRN">'&lt;td class="om-messageBox-imageTd">&lt;div class="om-messageBox-image"/>&nbsp;&lt;/td>'</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT">
<span class='line'> 27</span> </span><span class="WHIT">	                        </span><span class="STRN">'&lt;td class="om-message-content-html">&lt;/td>'</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT">
<span class='line'> 28</span> </span><span class="WHIT">	                    </span><span class="STRN">'&lt;/tr>&lt;/table>'</span><span class="PUNC">+</span><span class="WHIT">
<span class='line'> 29</span> </span><span class="WHIT">	                </span><span class="STRN">'&lt;/div>'</span><span class="PUNC">+</span><span class="WHIT">
<span class='line'> 30</span> </span><span class="WHIT">	                </span><span class="STRN">'&lt;div class="om-messageBox-buttonpane om-widget-content om-corner-bottom om-helper-clearfix">'</span><span class="PUNC">+</span><span class="WHIT">
<span class='line'> 31</span> </span><span class="WHIT">	                    </span><span class="STRN">'&lt;div class="om-messageBox-buttonset">&lt;/div>'</span><span class="PUNC">+</span><span class="WHIT">
<span class='line'> 32</span> </span><span class="WHIT">	                </span><span class="STRN">'&lt;/div>'</span><span class="PUNC">+</span><span class="WHIT">
<span class='line'> 33</span> </span><span class="WHIT">	            </span><span class="STRN">'&lt;/div>'</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 34</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_height</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 35</span> </span><span class="WHIT">        </span><span class="COMM">// handle IE 6</span><span class="WHIT">
<span class='line'> 36</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">$.browser.msie</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">$.browser.version</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NUMB">7</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 37</span> </span><span class="WHIT">            </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">scrollHeight</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Math.max</span><span class="PUNC">(</span><span class="NAME">document.documentElement.scrollHeight</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">document.body.scrollHeight</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 38</span> </span><span class="WHIT">                </span><span class="NAME">offsetHeight</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Math.max</span><span class="PUNC">(</span><span class="NAME">document.documentElement.offsetHeight</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">document.body.offsetHeight</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 39</span> </span><span class="WHIT">            </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">scrollHeight</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">offsetHeight</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT">  </span><span class="NAME">$</span><span class="PUNC">(</span><span class="NAME">window</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">height</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">scrollHeight</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 40</span> </span><span class="WHIT">        </span><span class="COMM">// handle "good" browsers</span><span class="WHIT">
<span class='line'> 41</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 42</span> </span><span class="WHIT">            </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">$</span><span class="PUNC">(</span><span class="NAME">document</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">height</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 43</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'> 44</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 45</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_width</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 46</span> </span><span class="WHIT">        </span><span class="COMM">// handle IE</span><span class="WHIT">
<span class='line'> 47</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">$.browser.msie</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 48</span> </span><span class="WHIT">            </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">scrollWidth</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Math.max</span><span class="PUNC">(</span><span class="NAME">document.documentElement.scrollWidth</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">document.body.scrollWidth</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 49</span> </span><span class="WHIT">                </span><span class="NAME">offsetWidth</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Math.max</span><span class="PUNC">(</span><span class="NAME">document.documentElement.offsetWidth</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">document.body.offsetWidth</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 50</span> </span><span class="WHIT">            </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">scrollWidth</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">offsetWidth</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="NAME">$</span><span class="PUNC">(</span><span class="NAME">window</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">width</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">scrollWidth</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 51</span> </span><span class="WHIT">        </span><span class="COMM">// handle "good" browsers</span><span class="WHIT">
<span class='line'> 52</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 53</span> </span><span class="WHIT">            </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">$</span><span class="PUNC">(</span><span class="NAME">document</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">width</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 54</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'> 55</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 56</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">close</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">messageBox</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">mask</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">handler</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">value</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 57</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">messageBox.hasClass</span><span class="PUNC">(</span><span class="STRN">'om-messageBox-waiting'</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 58</span> </span><span class="WHIT">	        </span><span class="KEYW">return</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 59</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'> 60</span> </span><span class="WHIT">	    </span><span class="NAME">handler</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="NAME">handler</span><span class="PUNC">(</span><span class="NAME">value</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">jQuery.noop</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 61</span> </span><span class="WHIT">	    </span><span class="NAME">messageBox.remove</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 62</span> </span><span class="WHIT">	    </span><span class="NAME">mask.remove</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 63</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 64</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_show</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">config</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 65</span> </span><span class="WHIT">        </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">onClose</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">config.onClose</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 66</span> </span><span class="WHIT">        </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">messageBox</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">$</span><span class="PUNC">(</span><span class="NAME">tmpl</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">appendTo</span><span class="PUNC">(</span><span class="NAME">document.body</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">css</span><span class="PUNC">(</span><span class="STRN">'z-index'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">1500</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">position</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 67</span> </span><span class="WHIT">            </span><span class="NAME">of</span><span class="PUNC">:</span><span class="NAME">window</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 68</span> </span><span class="WHIT">            </span><span class="NAME">collision</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'fit'</span><span class="WHIT">
<span class='line'> 69</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">omDraggable</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 70</span> </span><span class="WHIT">            </span><span class="NAME">containment</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'document'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 71</span> </span><span class="WHIT">            </span><span class="NAME">cursor</span><span class="PUNC">:</span><span class="STRN">'move'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 72</span> </span><span class="WHIT">            </span><span class="NAME">handle</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'.om-messageBox-titlebar'</span><span class="WHIT">
<span class='line'> 73</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">hide</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">keydown</span><span class="PUNC">(</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">event</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 74</span> </span><span class="WHIT">            </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">event.keyCode</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">event.keyCode</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">$.om.keyCode.ESCAPE</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 75</span> </span><span class="WHIT">                </span><span class="NAME">close</span><span class="PUNC">(</span><span class="NAME">messageBox</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">mask</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 76</span> </span><span class="WHIT">                </span><span class="NAME">event.preventDefault</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 77</span> </span><span class="WHIT">            </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'> 78</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 79</span> </span><span class="WHIT">        </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">mask</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">$</span><span class="PUNC">(</span><span class="STRN">'&lt;div class="om-widget-overlay"/>'</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">appendTo</span><span class="PUNC">(</span><span class="NAME">document.body</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">show</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">css</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">height</span><span class="PUNC">:</span><span class="NAME">_height</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="NAME">width</span><span class="PUNC">:</span><span class="NAME">_width</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 80</span> </span><span class="WHIT">        </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">closeBut</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">messageBox.find</span><span class="PUNC">(</span><span class="STRN">'span.om-messageBox-title'</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">html</span><span class="PUNC">(</span><span class="NAME">config.title</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">next</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">hover</span><span class="PUNC">(</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 81</span> </span><span class="WHIT">            </span><span class="NAME">$</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">addClass</span><span class="PUNC">(</span><span class="STRN">'om-state-hover'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 82</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 83</span> </span><span class="WHIT">            </span><span class="NAME">$</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">removeClass</span><span class="PUNC">(</span><span class="STRN">'om-state-hover'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 84</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">focus</span><span class="PUNC">(</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 85</span> </span><span class="WHIT">            </span><span class="NAME">$</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">addClass</span><span class="PUNC">(</span><span class="STRN">'om-state-focus'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 86</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">blur</span><span class="PUNC">(</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 87</span> </span><span class="WHIT">            </span><span class="NAME">$</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">removeClass</span><span class="PUNC">(</span><span class="STRN">'om-state-focus'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 88</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">click</span><span class="PUNC">(</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">event</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 89</span> </span><span class="WHIT">            </span><span class="NAME">close</span><span class="PUNC">(</span><span class="NAME">messageBox</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">mask</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 90</span> </span><span class="WHIT">            </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 91</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">bind</span><span class="PUNC">(</span><span class="STRN">'mousedown mouseup'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 92</span> </span><span class="WHIT">            </span><span class="NAME">$</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">toggleClass</span><span class="PUNC">(</span><span class="STRN">'om-state-mousedown'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 93</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 94</span> </span><span class="WHIT">        </span><span class="NAME">messageBox.find</span><span class="PUNC">(</span><span class="STRN">'div.om-messageBox-image'</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">addClass</span><span class="PUNC">(</span><span class="STRN">'om-messageBox-image-'</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">config.type</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 95</span> </span><span class="WHIT">        </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">content</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">config.content</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 96</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">config.type</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">'prompt'</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 97</span> </span><span class="WHIT">            </span><span class="NAME">content</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">content</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="STRN">''</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 98</span> </span><span class="WHIT">            </span><span class="NAME">content</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">'&lt;br/>&lt;input id="om-messageBox-prompt-input" type="text"/>'</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 99</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>100</span> </span><span class="WHIT">        </span><span class="NAME">messageBox.find</span><span class="PUNC">(</span><span class="STRN">'td.om-message-content-html'</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">html</span><span class="PUNC">(</span><span class="NAME">content</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>101</span> </span><span class="WHIT">        </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">buttonSet</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">messageBox.find</span><span class="PUNC">(</span><span class="STRN">'div.om-messageBox-buttonset'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>102</span> </span><span class="WHIT">        </span><span class="KEYW">switch</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">config.type</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>103</span> </span><span class="WHIT">            </span><span class="KEYW">case</span><span class="WHIT"> </span><span class="STRN">'confirm'</span><span class="PUNC">:</span><span class="WHIT">
<span class='line'>104</span> </span><span class="WHIT">                </span><span class="NAME">buttonSet.html</span><span class="PUNC">(</span><span class="STRN">'&lt;button id="confirm">确定&lt;/button>&lt;button id="cancel">取消&lt;/button>'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>105</span> </span><span class="WHIT">                </span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">$.fn.omButton</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>106</span> </span><span class="WHIT">	                </span><span class="NAME">buttonSet.find</span><span class="PUNC">(</span><span class="STRN">"button#confirm"</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">omButton</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>107</span> </span><span class="WHIT">	                	</span><span class="NAME">width</span><span class="PUNC">:</span><span class="NUMB">60</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>108</span> </span><span class="WHIT">	                	</span><span class="NAME">onClick</span><span class="PUNC">:</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">event</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>109</span> </span><span class="WHIT">	                		</span><span class="NAME">close</span><span class="PUNC">(</span><span class="NAME">messageBox</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">mask</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">onClose</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>110</span> </span><span class="WHIT">	                	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>111</span> </span><span class="WHIT">	                </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>112</span> </span><span class="WHIT">	                </span><span class="NAME">buttonSet.find</span><span class="PUNC">(</span><span class="STRN">"button#cancel"</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">omButton</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>113</span> </span><span class="WHIT">	                	</span><span class="NAME">width</span><span class="PUNC">:</span><span class="NUMB">60</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>114</span> </span><span class="WHIT">	                	</span><span class="NAME">onClick</span><span class="PUNC">:</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">event</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>115</span> </span><span class="WHIT">	                		</span><span class="NAME">close</span><span class="PUNC">(</span><span class="NAME">messageBox</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">mask</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">onClose</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>116</span> </span><span class="WHIT">	                	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>117</span> </span><span class="WHIT">	                </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>118</span> </span><span class="WHIT">                </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>119</span> </span><span class="WHIT">                </span><span class="KEYW">break</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>120</span> </span><span class="WHIT">            </span><span class="KEYW">case</span><span class="WHIT"> </span><span class="STRN">'prompt'</span><span class="PUNC">:</span><span class="WHIT">
<span class='line'>121</span> </span><span class="WHIT">                </span><span class="NAME">buttonSet.html</span><span class="PUNC">(</span><span class="STRN">'&lt;button id="confirm">确定&lt;/button>&lt;button id="cancel">取消&lt;/button>'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>122</span> </span><span class="WHIT">                </span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">$.fn.omButton</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>123</span> </span><span class="WHIT">	                </span><span class="NAME">buttonSet.find</span><span class="PUNC">(</span><span class="STRN">"button#confirm"</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">omButton</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>124</span> </span><span class="WHIT">	                	</span><span class="NAME">width</span><span class="PUNC">:</span><span class="NUMB">60</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>125</span> </span><span class="WHIT">	                	</span><span class="NAME">onClick</span><span class="PUNC">:</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">event</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>126</span> </span><span class="WHIT">	                        </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">returnValue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">onClose</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="NAME">onClose</span><span class="PUNC">(</span><span class="NAME">$</span><span class="PUNC">(</span><span class="STRN">'#om-messageBox-prompt-input'</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">val</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">jQuery.noop</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>127</span> </span><span class="WHIT">	                        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">returnValue</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>128</span> </span><span class="WHIT">	                            </span><span class="NAME">messageBox.remove</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>129</span> </span><span class="WHIT">	                            </span><span class="NAME">mask.remove</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>130</span> </span><span class="WHIT">	                        </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>131</span> </span><span class="WHIT">	                	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>132</span> </span><span class="WHIT">	                </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>133</span> </span><span class="WHIT">	                </span><span class="NAME">buttonSet.find</span><span class="PUNC">(</span><span class="STRN">"button#cancel"</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">omButton</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>134</span> </span><span class="WHIT">	                	</span><span class="NAME">width</span><span class="PUNC">:</span><span class="NUMB">60</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>135</span> </span><span class="WHIT">	                	</span><span class="NAME">onClick</span><span class="PUNC">:</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">event</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>136</span> </span><span class="WHIT">	                		</span><span class="NAME">close</span><span class="PUNC">(</span><span class="NAME">messageBox</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">mask</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">onClose</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>137</span> </span><span class="WHIT">	                	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>138</span> </span><span class="WHIT">	                </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>139</span> </span><span class="WHIT">                </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>140</span> </span><span class="WHIT">                </span><span class="KEYW">break</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>141</span> </span><span class="WHIT">            </span><span class="KEYW">case</span><span class="WHIT"> </span><span class="STRN">'waiting'</span><span class="PUNC">:</span><span class="WHIT">
<span class='line'>142</span> </span><span class="WHIT">                </span><span class="NAME">messageBox.addClass</span><span class="PUNC">(</span><span class="STRN">'om-messageBox-waiting'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>143</span> </span><span class="WHIT">                </span><span class="NAME">mask.addClass</span><span class="PUNC">(</span><span class="STRN">'om-messageBox-waiting'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>144</span> </span><span class="WHIT">                </span><span class="NAME">closeBut.hide</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="COMM">//不显示关闭按钮</span><span class="WHIT">
<span class='line'>145</span> </span><span class="WHIT">                </span><span class="NAME">buttonSet.parent</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">hide</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="COMM">//不显示下面的按钮面板</span><span class="WHIT">
<span class='line'>146</span> </span><span class="WHIT">                </span><span class="NAME">messageBox.find</span><span class="PUNC">(</span><span class="STRN">">.om-messageBox-content"</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">addClass</span><span class="PUNC">(</span><span class="STRN">"no-button om-corner-bottom"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>147</span> </span><span class="WHIT">                </span><span class="KEYW">break</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>148</span> </span><span class="WHIT">            </span><span class="KEYW">default</span><span class="PUNC">:</span><span class="WHIT">
<span class='line'>149</span> </span><span class="WHIT">                </span><span class="NAME">buttonSet.html</span><span class="PUNC">(</span><span class="STRN">'&lt;button id="confirm">确定&lt;/button>'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>150</span> </span><span class="WHIT">	            </span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">$.fn.omButton</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>151</span> </span><span class="WHIT">		            </span><span class="NAME">buttonSet.find</span><span class="PUNC">(</span><span class="STRN">"button#confirm"</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">omButton</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>152</span> </span><span class="WHIT">		            	</span><span class="NAME">width</span><span class="PUNC">:</span><span class="NUMB">60</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>153</span> </span><span class="WHIT">		            	</span><span class="NAME">onClick</span><span class="PUNC">:</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">event</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>154</span> </span><span class="WHIT">		            		</span><span class="NAME">close</span><span class="PUNC">(</span><span class="NAME">messageBox</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">mask</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">onClose</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>155</span> </span><span class="WHIT">		            	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>156</span> </span><span class="WHIT">		            </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>157</span> </span><span class="WHIT">	            </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>158</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>159</span> </span><span class="WHIT">        </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">buts</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">$</span><span class="PUNC">(</span><span class="STRN">'button'</span><span class="PUNC">,</span><span class="NAME">buttonSet</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>160</span> </span><span class="WHIT">        </span><span class="NAME">buts.width</span><span class="PUNC">(</span><span class="STRN">"100%"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>161</span> </span><span class="WHIT">        </span><span class="NAME">messageBox.show</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>162</span> </span><span class="WHIT">        </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">okBut</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">buts.first</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>163</span> </span><span class="WHIT">        </span><span class="NAME">okBut</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="NAME">okBut.focus</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">messageBox.focus</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>164</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>165</span> </span><span class="WHIT">     </span><span class="COMM">/**
<span class='line'>166</span>       * @name omMessageBox
<span class='line'>167</span>       * @class
<span class='line'>168</span>       * omMessageBox用于提供提示信息的弹出窗口，类似于JavaScript中使用alert()、confirm()、prompt()函数时出现的那种提示信息的弹出窗口。&lt;br/>&lt;br/>
<span class='line'>169</span>       * &lt;br/>
<span class='line'>170</span>       * &lt;h2>有以下特点：&lt;/h2>&lt;br/>
<span class='line'>171</span>       * &lt;ul>
<span class='line'>172</span>       *     &lt;li>有较好的浏览器兼容性&lt;/li>
<span class='line'>173</span>       *     &lt;li>可以定义标题、内容，并且标题和内容可以使用html代码&lt;/li>
<span class='line'>174</span>       *     &lt;li>标题栏有关闭按钮，也可以按Esc键关闭&lt;/li>
<span class='line'>175</span>       *     &lt;li>支持丰富的提示（图标不同）&lt;/li>
<span class='line'>176</span>       *     &lt;li>可以监听关闭事件&lt;/li>
<span class='line'>177</span>       * &lt;/ul>
<span class='line'>178</span>       * &lt;br/>
<span class='line'>179</span>       * &lt;h2>提供了以下工具方法：&lt;/h2>&lt;br/>
<span class='line'>180</span>       * &lt;ul>
<span class='line'>181</span>       *     &lt;li>
<span class='line'>182</span>       *         &lt;b>$.omMessageBox.alert(config)&lt;/b>&lt;br/>
<span class='line'>183</span>       *         弹出一个Alert提示，仅有一个“确定”按钮。其中config有以下配置项：&lt;br/>
<span class='line'>184</span>       *         &lt;ul style="margin-left:40px">
<span class='line'>185</span>       *             &lt;li>type：alert提示的类型，类型不同时弹出窗口左边的图标会不同。String类型，可选的值有'alert'、'success'、'error'、'question'、'warning'。默认值为'alert'。&lt;/li>
<span class='line'>186</span>       *             &lt;li>title：弹出窗口的标题文字，String类型，可以使用普通字符串，也可以使用html代码。默认值为'提示'。&lt;/li>
<span class='line'>187</span>       *             &lt;li>content：弹出窗口的提示内容，String类型，可以使用普通字符串，也可以使用html代码。无默认值。&lt;/li>
<span class='line'>188</span>       *             &lt;li>onClose：弹出窗口关闭时的回调函数，Function类型，点击"确定"按钮来关闭弹出窗口时，Function的参数value值为true，按ESC键关闭弹出窗口时，Function的参数value值为false。无默认值。&lt;/li>
<span class='line'>189</span>       *         &lt;/ul>
<span class='line'>190</span>       *         &lt;br/>使用方式如下：&lt;br/>
<span class='line'>191</span>       *         &lt;pre>
<span class='line'>192</span>       *             $.omMessageBox.alert({
<span class='line'>193</span>       *                 type:'error',
<span class='line'>194</span>       *                 title:'失败',
<span class='line'>195</span>       *                 content:'不能删除&lt;font color="red">admin&lt;/font>用户',
<span class='line'>196</span>       *                 onClose:function(value){
<span class='line'>197</span>       *                     alert('do something');
<span class='line'>198</span>       *                 }
<span class='line'>199</span>       *             });
<span class='line'>200</span>       *         &lt;/pre>
<span class='line'>201</span>       *     &lt;/li>
<span class='line'>202</span>       *     &lt;li>
<span class='line'>203</span>       *         &lt;b>$.omMessageBox.confirm(config)&lt;/b>&lt;br/>
<span class='line'>204</span>       *         弹出一个Confirm提示，有“确定”和“取消”按钮。其中config有以下配置项：&lt;br/>
<span class='line'>205</span>       *         &lt;ul style="margin-left:40px">
<span class='line'>206</span>       *             &lt;li>title：弹出窗口的标题文字，String类型，可以使用普通字符串，也可以使用html代码。默认值为'确认'。&lt;/li>
<span class='line'>207</span>       *             &lt;li>content：弹出窗口的提示内容，String类型，可以使用普通字符串，也可以使用html代码。无默认值。&lt;/li>
<span class='line'>208</span>       *             &lt;li>onClose：弹出窗口关闭时的回调函数，Function类型，点击"确定"按钮来关闭弹出窗口时，Function的参数value值为true，点击“取消”按钮或按ESC键关闭弹出窗口时，Function的参数value值为false。无默认值。&lt;/li>
<span class='line'>209</span>       *         &lt;/ul>
<span class='line'>210</span>       *         &lt;br/>使用方式如下：&lt;br/>
<span class='line'>211</span>       *         &lt;pre>
<span class='line'>212</span>       *             $.omMessageBox.confirm({
<span class='line'>213</span>       *                 title:'确认删除',
<span class='line'>214</span>       *                 content:'删除用户后，它所有的发帖和回帖将同时删除（不可恢复），你确定要这样做吗？',
<span class='line'>215</span>       *                 onClose:function(value){
<span class='line'>216</span>       *                     alert(value?'开始删除操作':'不删除了');
<span class='line'>217</span>       *                 }
<span class='line'>218</span>       *             });
<span class='line'>219</span>       *         &lt;/pre>
<span class='line'>220</span>       *     &lt;/li>
<span class='line'>221</span>       *     &lt;li>
<span class='line'>222</span>       *         &lt;b>$.omMessageBox.prompt(config)&lt;/b>&lt;br/>
<span class='line'>223</span>       *         弹出一个Prompt提示，有一个输入框和“确定”和“取消”按钮。其中config有以下配置项：
<span class='line'>224</span>       *         &lt;ul style="margin-left:40px">
<span class='line'>225</span>       *             &lt;li>title：弹出窗口的标题文字，String类型，可以使用普通字符串，也可以使用html代码。默认值为'请输入'。&lt;/li>
<span class='line'>226</span>       *             &lt;li>content：弹出窗口的提示内容，String类型，可以使用普通字符串，也可以使用html代码。无默认值。&lt;/li>
<span class='line'>227</span>       *             &lt;li>onClose：弹出窗口关闭时的回调函数，Function类型，点击"确定"按钮来关闭弹出窗口时，Function的参数value值为用户在输入框里输入的字符串（一定是字符串），点击“取消”按钮或按ESC键关闭弹出窗口时，Function的参数value值为false。无默认值。&lt;b>注意：在此方法中返回false将会阻止弹出窗口关闭。&lt;/b>&lt;/li>
<span class='line'>228</span>       *         &lt;/ul>
<span class='line'>229</span>       *         &lt;br/>使用方式如下：&lt;br/>
<span class='line'>230</span>       *         &lt;pre>
<span class='line'>231</span>       *             $.omMessageBox.prompt({
<span class='line'>232</span>       *                 title:'商品数量',
<span class='line'>233</span>       *                 content:'请输入你要购买的商品的数量（你的余额最多只能购买12千克）：',
<span class='line'>234</span>       *                 onClose:function(value){
<span class='line'>235</span>       *                     if(value===false){ //按了取消或ESC
<span class='line'>236</span>       *                         alert('取消购买');
<span class='line'>237</span>       *                         return;
<span class='line'>238</span>       *                     }
<span class='line'>239</span>       *                     if(value==''){
<span class='line'>240</span>       *                         alert('数量不能为空');
<span class='line'>241</span>       *                         return false; //不关闭弹出窗口
<span class='line'>242</span>       *                     }
<span class='line'>243</span>       *                     if(value-0+'' !== value){
<span class='line'>244</span>       *                         alert('只能输入数字');
<span class='line'>245</span>       *                         return false;  //不关闭弹出窗口
<span class='line'>246</span>       *     `               }
<span class='line'>247</span>       *                     if(value&lt;0 || value&gt;12){
<span class='line'>248</span>       *                         alert('请输入0-12之间的数字（可带小数）');
<span class='line'>249</span>       *                         return false; //不关闭弹出窗口
<span class='line'>250</span>       *                     }else{
<span class='line'>251</span>       *                         alert('开始购买'+value+'千克商品');
<span class='line'>252</span>       *                     }
<span class='line'>253</span>       *                 }
<span class='line'>254</span>       *             });
<span class='line'>255</span>       *         &lt;/pre>
<span class='line'>256</span>       *     &lt;/li>
<span class='line'>257</span>       *     &lt;li>
<span class='line'>258</span>       *         &lt;b>$.omMessageBox.waiting(config | 'close')&lt;/b>&lt;br/>
<span class='line'>259</span>       *         弹出一个Prompt提示，有一个输入框和“确定”和“取消”按钮。该提示窗口没有关闭按钮，也不可以按ESC关闭。如果参数是'close'时表示关闭上次弹出的Waiting提示窗口。如果是config时表示要弹出一个Waiting提示窗口，其中config有以下配置项：
<span class='line'>260</span>       *         &lt;ul style="margin-left:40px">
<span class='line'>261</span>       *             &lt;li>title：弹出窗口的标题文字，String类型，可以使用普通字符串，也可以使用html代码。默认值为'请稍候'。&lt;/li>
<span class='line'>262</span>       *             &lt;li>content：弹出窗口的提示内容，String类型，可以使用普通字符串，也可以使用html代码。无默认值。&lt;/li>
<span class='line'>263</span>       *         &lt;/ul>
<span class='line'>264</span>       *         &lt;br/>使用方式如下：&lt;br/>
<span class='line'>265</span>       *         &lt;pre>
<span class='line'>266</span>       *             //弹出提示
<span class='line'>267</span>       *             $.omMessageBox.waiting({
<span class='line'>268</span>       *                 title:'请稍候',
<span class='line'>269</span>       *                 content:'服务器正在处理您的请求，请稍候...',
<span class='line'>270</span>       *             });
<span class='line'>271</span>       * 
<span class='line'>272</span>       *             //关闭提示
<span class='line'>273</span>       *             $.omMessageBox.waiting('close');
<span class='line'>274</span>       *         &lt;/pre>
<span class='line'>275</span>       *     &lt;/li>
<span class='line'>276</span>       * &lt;/ul>
<span class='line'>277</span>       */</span><span class="WHIT">
<span class='line'>278</span> </span><span class="WHIT">    </span><span class="NAME">$.omMessageBox</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>279</span> </span><span class="WHIT">        </span><span class="NAME">alert</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">config</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>280</span> </span><span class="WHIT">            </span><span class="NAME">config</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">config</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>281</span> </span><span class="WHIT">            </span><span class="NAME">config.title</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">config.title</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="STRN">'提示'</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>282</span> </span><span class="WHIT">            </span><span class="NAME">config.type</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">config.type</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="STRN">'alert'</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>283</span> </span><span class="WHIT">            </span><span class="NAME">_show</span><span class="PUNC">(</span><span class="NAME">config</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>284</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>285</span> </span><span class="WHIT">        </span><span class="NAME">confirm</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">config</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>286</span> </span><span class="WHIT">            </span><span class="NAME">config</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">config</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>287</span> </span><span class="WHIT">            </span><span class="NAME">config.title</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">config.title</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="STRN">'确认'</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>288</span> </span><span class="WHIT">            </span><span class="NAME">config.type</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">'confirm'</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>289</span> </span><span class="WHIT">            </span><span class="NAME">_show</span><span class="PUNC">(</span><span class="NAME">config</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>290</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>291</span> </span><span class="WHIT">        </span><span class="NAME">prompt</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">config</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>292</span> </span><span class="WHIT">            </span><span class="NAME">config</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">config</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>293</span> </span><span class="WHIT">            </span><span class="NAME">config.title</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">config.title</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="STRN">'请输入'</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>294</span> </span><span class="WHIT">            </span><span class="NAME">config.type</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">'prompt'</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>295</span> </span><span class="WHIT">            </span><span class="NAME">_show</span><span class="PUNC">(</span><span class="NAME">config</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>296</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>297</span> </span><span class="WHIT">        </span><span class="NAME">waiting</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">config</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>298</span> </span><span class="WHIT">            </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">config</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="STRN">'close'</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>299</span> </span><span class="WHIT">                </span><span class="NAME">$</span><span class="PUNC">(</span><span class="STRN">'.om-messageBox-waiting'</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">remove</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>300</span> </span><span class="WHIT">                </span><span class="KEYW">return</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>301</span> </span><span class="WHIT">            </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>302</span> </span><span class="WHIT">            </span><span class="NAME">config</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">config</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>303</span> </span><span class="WHIT">            </span><span class="NAME">config.title</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">config.title</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="STRN">'请等待'</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>304</span> </span><span class="WHIT">            </span><span class="NAME">config.type</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">'waiting'</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>305</span> </span><span class="WHIT">            </span><span class="NAME">_show</span><span class="PUNC">(</span><span class="NAME">config</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>306</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>307</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>308</span> </span><span class="PUNC">}</span><span class="PUNC">(</span><span class="NAME">jQuery</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span></pre></body></html>